<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
    <script>
        // 获取两个 set 的并集
        var set1 = new Set([1,2,3]);
        var set2 = new Set([4,2,3]);
        var union = new Set([...set1,...set2]);
        console.log(union);
    </script>
</body>
</html>